﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Yonkly.Models
{
    public class SidebarStatsViewData
    {
        public SidebarStatsViewData(Guid UserId)
        {
            using (YonklyDataContext dc = new YonklyDataContext())
            {
                var results = dc.GetSidebarStats(UserId).First();
                Username = results.Username ?? string.Empty;
                FriendsCount = results.FriendsCount ?? 0;
                FollowersCount = results.FollowersCount ?? 0;
                MessagesCount = results.MessagesCount ?? 0;
                RepliesCount = results.RepliesCount ?? 0;
                FriendsMessagesCount = results.FriendsMessagesCount ?? 0;
            }
        }
        public int FriendsCount { get; set; }

        public int FollowersCount { get; set; }

        public int MessagesCount { get; set; }

        public int RepliesCount { get; set; }

        public string Username { get; set; }

        public int FriendsMessagesCount { get; set; }
    }
}
